package com.bpf.base.service.system;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bpf.base.dao.system.DictMapper;
import com.bpf.base.model.system.Dict;
import com.bpf.base.model.system.DictExample;

@Service
@Transactional
public class DictService {

	@Autowired
	private DictMapper dictMapper;

	public List<Dict> selectByType(String type) {
		return dictMapper.selectByType(type);
	}

	public Dict selectValue(Map p) {
		return dictMapper.selectValue(p);
	}

	public List<Dict> selectList(Map<String, Object> conditions) {
		return dictMapper.selectList(conditions);
	}

	public int selectCount(Map<String, Object> conditions) {
		return dictMapper.selectCount(conditions);
	}

	public List<Dict> selectByExample(DictExample example) {
		return dictMapper.selectByExample(example);
	}

	public int insertSelective(Dict record) {
		return dictMapper.insertSelective(record);
	}

	public int updateByExampleSelective(@Param("record") Dict record, @Param("example") DictExample example) {
		return dictMapper.updateByExampleSelective(record, example);
	}

	public int deleteByExample(DictExample example) {
		return dictMapper.deleteByExample(example);
	}

	public int updateByPrimaryKeySelective(Dict record) {
		return dictMapper.updateByPrimaryKeySelective(record);
	}

	public List<Dict> selectDistinctType() {
		return dictMapper.selectDistinctType();
	}

	public List<Dict> selectAll() {
		return dictMapper.selectAll();
	}


	public int deleteByPrimaryKey(Integer dictId) {
		return dictMapper.deleteByPrimaryKey(dictId);
	}


	public Dict selectByPrimaryKey(Integer dictId) {
		return dictMapper.selectByPrimaryKey(dictId);
	}
	
	public List <Map<String,Object>>selectDictsByType(String type){
		return dictMapper.selectDictsByType(type);
		
		
	}
	public Map<String, String> getDictMap(Class<?> clazz){
		return null;
	}
	
	public int selectMaxCode(String type){
		return dictMapper.selectMaxCode(type);
	}

}
